{extends file="backend/index.tpl"}
{block name="page-content"}
<div class="page-header">
    <div class="icon">
        <span class="ico-pen-2"></span>
    </div>
    <h1>QUYỂN <small>QUẢN LÝ QUYỂN</small></h1>
</div>
<form id="validate" action="{$base_url}admin/add-volume.html" method="post" enctype="multipart/form-data">
<div class="row-fluid">
    <div class="span12">
        <div class="block">
            <div class="head">
                <h2>Thêm Quyển</h2>
            </div>
            <div class="data-fluid">
                <div class="row-form">
					<div class="span2">No(Quyển)</div>
					<div class="span4">
						<input type="text" class="validate[required]" name="no" /> <span
							class="bottom">Required</span>
					</div>
				</div>
				<div class="row-form">
					<div class="span2">Name</div>
					<div class="span4">
						<input type="text" class="validate[required]" name="name" /> <span
							class="bottom">Required</span>
					</div>
				</div>
				<div class="row-form">
					<div class="span2">Book Name</div>
					<div class="span4">
						<select name="book_id" class="select" style="width: 100%;">
							{foreach from=$listBook item=book} 
							<option value="{$book.book_id}">{$book.book_name}</option>
							{/foreach}
						</select>
					</div>
				</div>
                <div class="toolbar bottom tac">
                    <div class="btn-group">
                        <button class="btn btn-info" type="button" onClick="$('#validate').validationEngine('hide');">Ẩn Thông Báo</button>
                        <button class="btn" type="submit" name="submit" id="addBook">Thêm Quyển Mới</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</form>
<div class="row-fluid">
    <div class="span12">
        <div class="block">
            <div class="head dblue">
                <div class="icon"><span class="ico-layout-9"></span></div>
                <h2>Danh Sách Quyển</h2>
                <ul class="buttons">
                    <li><a href="#" onClick="source('table_sort_pagination'); return false;">
                        <div class="icon"><span class="ico-info"></span></div>
                    </a></li>
                </ul>
            </div>
            <div class="data-fluid">
                <table class="table lcnp" id="listGame" cellpadding="0" cellspacing="0" width="100%">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>No</th>
                            <th>Name</th>
                            <th>Book Name</th>
                            <th width="80" class="TAC">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                    {foreach from=$listVolume item=volume}
                        <tr class="edit_tr">
                            <td width="5%">{$volume.volume_id}</td>
                            <td width="15%">{$volume.volume_no}</td>
                            <td width="30%">{$volume.volume_name}</td>
                            <td width="15%">{$volume.book_name}</td>
                            <td width="15%">
                                <a href="{$base_url}admin/update-volume/{$volume.volume_id}.html" class="button green">
                                    <div class="icon"><span class="ico-pencil"></span></div>
                                </a>
                                <a href="{$base_url}admin/delete-volume/{$volume.volume_id}" class="button red" onclick="return confirm('Bạn có muốn xóa tiếp không?')">
                                    <div class="icon"><span class="ico-remove"></span></div>
                                </a>
                            </td>
                        </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
            <div class="pagination" style="text-align:center;">  
                {$pageList}  
            </div>
        </div>
    </div>
</div>

{/block}
